Flash memories, which use dielectric trapping layers or floating layers to store charges, are often used in System-On-Chip (SOC) technology, and are formed on the same chip along with other integrated circuits. For example, High-Voltage (HV) circuits, Input/output (10) circuits, core circuits, and Static Random Access Memory (SRAM) circuits are often integrated on the same chip as the flash memories. The respective flash memories are often referred to as embedded memories since they are embedded in the chip on which other circuits are formed, as compared to the flash memories formed on chips that do not have other circuits. Flash memories have structures different from HV circuit devices, IO circuit devices, core circuit devices, and SRAM circuit devices. Therefore, the embedding of memory devices with other types of devices faces challenges when the technology evolves.